home *** CD-ROM | disk | FTP | other *** search
/ Merciful 2 / Merciful - Disc 2.iso / software / m / maxonc++2.dms / maxonc++2.adf / MCPIncl.lha / rexx / rexxio.h < prev    next >
C/C++ Source or Header  |  1992-02-10  |  3KB  |  84 lines

  1. #ifndef REXX_REXXIO_H
  2. #define REXX_REXXIO_H
  3. /*
  4. **    $Filename: rexx/rexxio.h $
  5. **    $Release: 2.04 $
  6. **    $Revision: 1.2 $
  7. **    $Date: 90/07/12 $
  8. **
  9. **    Header file for ARexx Input/Output related structures
  10. **
  11. **    (C) Copyright 1986,1987,1988,1989,1990 William S. Hawes
  12. **        All Rights Reserved
  13. */
  14.  
  15. #ifndef REXX_STORAGE_H
  16. #include "rexx/storage.h"
  17. #endif
  18.  
  19. #define RXBUFFSZ  204               /* buffer length        */
  20.  
  21. /*
  22.  * The IoBuff is a resource node used to maintain the File List.  Nodes
  23.  * are allocated and linked into the list whenever a file is opened.
  24.  */
  25. struct IoBuff {
  26.    struct RexxRsrc iobNode;           /* structure for files/strings    */
  27.    APTR     iobRpt;               /* read/write pointer        */
  28.    LONG     iobRct;               /* character count        */
  29.    LONG     iobDFH;               /* DOS filehandle        */
  30.    APTR     iobLock;               /* DOS lock            */
  31.    LONG     iobBct;               /* buffer length        */
  32.    BYTE     iobArea[RXBUFFSZ];           /* buffer area            */
  33.    };                       /* size: 256 bytes        */
  34.  
  35. /* Access mode definitions                        */
  36. #define RXIO_EXIST   -1           /* an external filehandle    */
  37. #define RXIO_STRF    0               /* a "string file"        */
  38. #define RXIO_READ    1               /* read-only access        */
  39. #define RXIO_WRITE   2               /* write mode            */
  40. #define RXIO_APPEND  3               /* append mode (existing file)    */
  41.  
  42. /*
  43.  * Offset anchors for SeekF()
  44.  */
  45. #define RXIO_BEGIN   -1L           /* relative to start        */
  46. #define RXIO_CURR    0L           /* relative to current position    */
  47. #define RXIO_END     1L           /* relative to end        */
  48.  
  49. /* The Library List contains just plain resource nodes.        */
  50.  
  51. #define LLOFFSET(rrp) (rrp->rr_Arg1)   /* "Query" offset        */
  52. #define LLVERS(rrp)   (rrp->rr_Arg2)   /* library version        */
  53.  
  54. /*
  55.  * The RexxClipNode structure is used to maintain the Clip List.  The value
  56.  * string is stored as an argstring in the rr_Arg1 field.
  57.  */
  58. #define CLVALUE(rrp) ((STRPTR) rrp->rr_Arg1)
  59.  
  60. /*
  61.  * A message port structure, maintained as a resource node.  The ReplyList
  62.  * holds packets that have been received but haven't been replied.
  63.  */
  64. struct RexxMsgPort {
  65.    struct RexxRsrc rmp_Node;           /* linkage node            */
  66.    struct MsgPort  rmp_Port;           /* the message port        */
  67.    struct List       rmp_ReplyList;      /* messages awaiting reply    */
  68.    };
  69.  
  70. /*
  71.  * DOS Device types
  72.  */
  73. #define DT_DEV      0L               /* a device            */
  74. #define DT_DIR      1L               /* an ASSIGNed directory    */
  75. #define DT_VOL      2L               /* a volume            */
  76.  
  77. /*
  78.  * Private DOS packet types
  79.  */
  80. #define ACTION_STACK 2002L           /* stack a line            */
  81. #define ACTION_QUEUE 2003L           /* queue a line            */
  82.  
  83. #endif
  84.